import React from 'react';
import { Menu } from 'antd';
interface MenuProps {
    activeMenu: string;
    setActiveMenu: Function;
    menus: MenuItem[];
}
interface MenuItem {
    menuName: string;
    menuKey: string;
}
const SideMenu = ({ activeMenu, menus, setActiveMenu }: MenuProps) => {
    const onClick = (e: any) => {
        setActiveMenu(e.key);
    };
    return (
        <Menu
            defaultSelectedKeys={[activeMenu]}
            mode="inline"
            className="side-menu full-h"
            style={{ width: 200 }}
            onClick={onClick}
        >
            {menus.map((item) => (
                <Menu.Item key={item.menuKey}>{item.menuName}</Menu.Item>
            ))}
        </Menu>
    );
};
export default SideMenu;
